#include <stdio.h>

#define NUM 100000000
bool table[NUM] = { 0 };
int main( int argc, char *argv[] )
{
	for( size_t i = 2; i < NUM; i ++ ) {
		if( !table[i] ) {
			printf( "%u\n", i );
			if( i< 10000 ) {
				for( size_t j = i*i; j < NUM; j += i ) {
					if( !table[j] )
						table[j] = true;
				}
			}
		}
	}
	return 0;
}

